/**
 * @Title CustomException.java
 * @Package com.eppear.jpfm.framework.exception
 * @Description
 * @author JianFeng Zhang(张建锋)
 * @date 2016-12-26 下午11:40:33
 * @version 
 */
package com.eppear.jpfm.framework.exception;

/**
 * @ClassName CustomException
 * @Description
 *         自定义异常类,相对于系统运行时异常,
 *         增加了异常代码属性,便于业务处理和定位.
 * @author JianFeng Zhang(张建锋)
 * @date   2016-12-26 下午11:40:33
 *
 */
public class MyException extends RuntimeException {

	/** @Fields serialVersionUID : 实例化序列*/
	private static final long serialVersionUID = 6989215591229982291L;
	/** @Fields errorCode : 异常代码*/
	private Integer errorCode;
	/** @Fields errorMessage : 异常信息*/
	private String errorMessage;
	
	/**
	 * 构造自定义异常
	 */
	public MyException() {
		super();
	}
	
	public MyException(String errorMessage ) {
		super(errorMessage);
		this.errorMessage = errorMessage;
	}
	
	public MyException(String errorMessage,Throwable t ) {
		super(errorMessage,t);
		this.errorMessage = errorMessage;
	}
	
	public MyException(Integer errorCode,String errorMessage ) {
		super(errorMessage);
		this.errorCode = errorCode;
		this.errorMessage = errorMessage;
	}
	
	public MyException(Integer errorCode,String errorMessage,Throwable t ) {
		super(errorMessage,t);
		this.errorCode = errorCode;
		this.errorMessage = errorMessage;
	}
	
	public Integer getErrorCode() {
		return errorCode;
	}

	public String getErrorMessage() {
		return errorMessage;
	}
	

}
